<template>
  <div>
    <svg :style="{ width, height }">
      <use :xlink:href="prefix + name" :fill="color"></use>
    </svg>
  </div>
</template>
<script lang="ts" setup>
defineProps({
  prefix: {
    type: String,
    default: '#icon-',
  },
  name: {
    //svg图标名称
    type: String,
    default: '',
  },
  color: {
    //颜色
    type: String,
    default: 'pink',
  },
  width: {
    //宽度
    type: String,
    default: '16px',
  },
  height: {
    //高度
    type: String,
    default: '16px',
  },
})
</script>
<style lang="less" scoped>
</style>
